package com.web.config;

import java.time.LocalDateTime;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@EnableScheduling
public class ScheduleTaskConfig {
	@Scheduled(cron = "0 0/15 * * * ?") //定时任务注解+cron表达式，每15分钟执行一次
    public void testScheduleTask() {
        System.out.println("执行定时任务" + LocalDateTime.now());
    }
}
